﻿/** Window and animations settings **/

//window status state
var wstate=false;
var mstate=false;

/** Animation **/
function runAnimation(element){
	element.opacity = event.value;
}
function more(){
	view.beginAnimation(function() { moveWin(more_holder); }, -200, 31, 300);
	mstate=true;
	if (wstate){
		CloseWin();
	}
}
function closeMore(){
	view.beginAnimation(function() { moveWin(more_holder); }, 31, -200, 300);
	mstate=false;
}
function moveWin(element){
	element.x=event.value;
}
/** Message Window **/
function OpenWin(message){
	msg.InnerText=message;
	view.beginAnimation(function() { moveWin(msg_win); }, -200, 31, 300);
	wstate=true;
	if (mstate){
		closeMore();
	}
}
function CloseWin(){
	view.beginAnimation(function() { moveWin(msg_win); }, 31, -200, 300);
	wstate=false;
}
